package com.company.behavioral.visitor_pattern.client;

import com.company.behavioral.visitor_pattern.concrete_element.FulltimeEmployee;
import com.company.behavioral.visitor_pattern.concrete_element.ParttimeEmployee;
import com.company.behavioral.visitor_pattern.concrete_visitor.HRDepartment;
import com.company.behavioral.visitor_pattern.element.Employee;
import com.company.behavioral.visitor_pattern.object_structure.EmployeeList;
import com.company.behavioral.visitor_pattern.visitor.Department;

/**
 * @ClassName Client
 * @Author tiezheng.han
 * @Date 2020/9/7 17:13
 **/
public class Client {
    public static void main(String[] args) {
        EmployeeList list = new EmployeeList();
        Employee fte1,fte2,fte3,pte1,pte2;

        fte1 = new FulltimeEmployee("张三",3200,45);
        fte2 = new FulltimeEmployee("李四",2000,40);
        fte3 = new FulltimeEmployee("王五",2400,38);
        pte1 = new ParttimeEmployee("周六",80,20);
        pte2 = new ParttimeEmployee("吴七",60,18);

        list.addEmployee(fte1);
        list.addEmployee(fte2);
        list.addEmployee(fte3);
        list.addEmployee(pte1);
        list.addEmployee(pte2);

        Department dep = new HRDepartment();
        list.accept(dep);
    }
}
